$(document).ready(function(){
	$('#update-btn').click(function(){
		if($('#password').val()==='' && $('#password').val()===$('#confirm').val()){
			$('#form').submit();
		}else if($('#password').val()===$('#confirm').val()){
			$('#form').submit();
		}else{
			$.jqDialog.alert("Password and confirmation doesn't match, please check them or leave them in blank", function() {
				$('#password').attr('value','');
				$('#confirm').attr('value','');
				$('#password').focus();
			});
		}
	});
});